package {
	
	import flash.display.Sprite;
	import flash.events.Event;
	
	import loaders.resourceLoader.CaexpoLoadingMc;
	import loaders.resourceLoader.XMLResourceLoader;
	
	import memory.MemoryRecovery;
	/**
	 * 先加载策略文件，在加载数据库，数据库加载完毕后就初始化所有的管理者,最后，显示首页
	 */ 
	[SWF(width="900", height="600", frameRate="25", backgroundColor="#000000")]
	public class UnrealTravaling extends Sprite
	{
		private var loader:XMLResourceLoader;
		public function UnrealTravaling()
		{
//			this.addChild(new Main());
			var xml:XML=<Preload> 
			                          <Url>image/index.jpg</Url>
			                          <Url>image/lvsejiayuanmenkou.jpg</Url>
			                          <Url>image/puzzelGame.jpg</Url>
			                      </Preload>
			loader=new XMLResourceLoader(this,new CaexpoLoadingMc());
			loader.excute(xml);
		    loader.start();
		    loader.addEventListener(Event.COMPLETE,on_complete);
		}
		private function on_complete(e:Event):void
		{
			MemoryRecovery.getInstance().gcFun(loader,Event.COMPLETE,on_complete);
			MemoryRecovery.getInstance().gcObj(loader);loader=null;
		}
	}
}
